package com.heima.search.service;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.search.dtos.UserSearchDto;
import com.heima.model.search.vos.SearchArticleVo;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.io.IOException;

public interface SearchService {

    /**
     * 搜索操作
     * @param dto
     * @return
     */
    public ResponseResult search(UserSearchDto dto) throws IOException;

    /**
     * 新增数据到Es中
     */
    public void addArticleToEs(SearchArticleVo searchArticleVo);

    /**
     * 自动补全功能
     * @param userSearchDto
     * @return
     */
    public ResponseResult searchAssociate( UserSearchDto userSearchDto) throws IOException;
}